--*-----------------------------------------------------------------------------
--
-- GetOptionInt
--
--*-----------------------------------------------------------------------------
IF EXISTS (
  SELECT 1
    FROM sys.objects
   WHERE type = 'FN'
     AND schema_id = SCHEMA_ID('dbo')
     AND name = 'GetOptionInt'
)
DROP FUNCTION GetOptionInt
GO
--*-----------------------------------------------------------------------------
CREATE FUNCTION GetOptionInt(@key_str VARCHAR(50))
RETURNS INT
AS
BEGIN
  RETURN (SELECT value_int FROM site_option WHERE name = @key_str)
END
GO
